package cc.yiueil.feign;

import cc.yiueil.entity.ProductEntity;
import cc.yiueil.feign.impl.ProductServiceRemoteFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

// 指定目标微服务名称
@FeignClient(value = "service-product", fallback = ProductServiceRemoteFallback.class)
public interface ProductServiceRemote {

    @GetMapping(value = "getProduct")
    ProductEntity getProduct(@RequestParam(value = "id") Long id);
}
